﻿@model dynamic

@{
    ViewBag.Title = "入区登记";
    Layout = "~/Views/Shared/_Form.cshtml";
}

<form id="form1"autocomplete="off">
    <div class="panel panel-default" style="padding-right:10px;">
        <table class="form">
            <tr>
                <th class="formTitle">危重级别：</th>
                <td class="formValue">
                    <select id="sel_wzjb" name="sel_wzjb" class="form-control required" data-EnumType="EnumWzjb">
                        <option>==请选择==</option>
                    </select>
                </td>
            </tr>
            <tr>
                <th class="formTitle"><span class="required">*</span>入区日期：</th>
                <td class="formValue">
                    <input id="txt_rqrq" type="text" class="form-control input-wdatepicker formClearIgnore" style="width:70%;" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd HH:mm:ss' })"
                           onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd HH:mm:ss', onpicked: function () { RefreshOrder() } })" value="@DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")" />
                </td>
            </tr>
            <tr>
                <th class="formTitle"><span class="required">*</span>住院医生：</th>
                <td class="formValue">
                    <input id="txt_doctor" name="txt_doctor" data-StaffGh="" type="text" class="form-control required" />
                </td>
            </tr>
        </table>
    </div>
</form>
<script lang="javascript">
    $(function () {
        $("#txt_doctor").attr("data-StaffGh", "@ViewBag.ysgh");
        $("#txt_doctor").val("@ViewBag.ysmc");
    })
    $("#txt_doctor").dutyStaffFloatingSelector({
        dutyCode: 'Doctor'
    });
    function submitForm()
    {
        if ($('#txt_ryrq').val()=="") {
            $.modalAlert("请选择入区日期！", 'warning');
            return null;
        }
        if ($('#txt_doctor').val() == "" || $("#txt_doctor").attr("data-StaffGh")=="") {
            $.modalAlert("请选择住院医生！", 'warning');
            return null;
        }
        var obj = new Object();
        obj.wzjb = $('#sel_wzjb').val();
        obj.rqrq = $('#txt_rqrq').val();
        obj.ysgh=$("#txt_doctor").attr("data-StaffGh");
        obj.ysmc=$("#txt_doctor").val();
        $.modalClose("RqdjForm");
        return obj;
    }
</script>
